#include "actor.h"

Actor::Actor(Game *g){
    agraph=NULL;
    game = g;
}

Actor::~Actor(){
    if (agraph) delete agraph;
}

void Actor::draw(BITMAP *bmp){
    agraph->draw(bmp);
}

void Actor::update(){
    agraph->update();
    move();
}

void Actor::init(){
    agraph->init();
}

void Actor::move(){
}

void Actor::set_x(int pos_x){
    x=pos_x;
}

void Actor::set_y(int pos_y){
    y=pos_y;
}

void Actor::set_actor_graphic(ActorGraphic *ag){
    agraph=ag;
}

int Actor::get_x(){
    return x;
}

int Actor::get_y(){
    return y;
}

int Actor::get_w(){
    return agraph->get_w();
}

int Actor::get_h(){
    return agraph->get_h();
}

int Actor::get_graph_x(){
    return agraph->get_x();
}

int Actor::get_graph_y(){
    return agraph->get_y();
}

Mask *Actor::get_graph_mask(){
    return agraph->get_mask();
}

void Actor::set_is_detected(bool tf){
    is_detectable = tf;
}

bool Actor::get_is_detected(){
    return is_detectable;
}

void Actor::set_power(int pow){
    power = pow;
}

int Actor::get_power(){
    return power;
}

void Actor::set_collision_method(CollisionManager::collision_method_t cm){
    collision_method = cm;
}

CollisionManager::collision_method_t Actor::get_collision_method(){
    return collision_method;
}

void Actor::hit(Actor *who, int damage){

}

void Actor::set_team(Game::team_t tm){
    team = tm;
}

Game::team_t Actor::get_team(){
    return team;
}
